<?php
/*
*
* workflow  审批流程系统-频道模型
*
* ----------------------------------------------
* 零起飞网络 - 专注于企业管理系统开发
* 以质量求生存，以服务谋发展，以信誉创品牌 !
* ----------------------------------------------
* @copyright	Copyright (C) 2017-2018 07FLY Network Technology Co,LTD All rights reserved.
* @license    For licensing, see LICENSE.html
* @author ：kfrs <goodkfrs@QQ.com> 574249366
* @version ：1.0
* @link ：http://www.07fly.xyz
*/
namespace app\workflow\controller;

/**
* 工作流程管理-控制器
*/

class WorkflowBusinessType extends WorkflowBase
{

    /**
     * 工作流程列表=》模板
     * @return mixed|string
     */
    public function show()
    {
        $this->common_data();
        return $this->fetch('show');
    }

    /**
     * 工作流程列表-》json数据
     * @return
     */
    public function show_json()
    {
        $where=[];
        $where=$this->logicWorkflowBusinessType->getWhere($this->param);
        $list = $this->logicWorkflowBusinessType->getAllList($where);
        return $list;
    }


    /**
     * 工作流程添加
     * @return mixed|string
     */
    public function add()
    {

        IS_POST && $this->jump($this->logicWorkflowBusinessType->setAdd($this->param));
        $this->common_data();
        return $this->fetch('add');
    }

    /**
     * 工作流程编辑
     * @return mixed|string
     */

    public function edit()
    {

        IS_POST && $this->jump($this->logicWorkflowBusinessType->setEdit($this->param));
        $info = $this->logicWorkflowBusinessType->getOne(['id' => $this->param['id']]);
        $this->assign('info', $info);
        $this->common_data();
        return $this->fetch('edit');
    }

    /**
     * 工作流程删除
     */
    public function del()
    {
        $where = empty($this->param['id']) ? ['id' => 0] : ['id' => $this->param['id']];
        $this->jump($this->logicWorkflowBusinessType->setDel($where));
    }


    /**
     * 公共数据
     * Author: lingqifei created by at 2020/6/15 0015
     */
    public function common_data()
    {



    }

}
